﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataSetUsersTableAdapters;

public partial class _6_Register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void txtUserName_TextChanged(object sender, EventArgs e)
    {
        T_UsersTableAdapter adapter = new T_UsersTableAdapter();
        if (adapter.GetDataByUserName(txtUserName.Text).Count >= 1)
        {
            UserNameErrorMessage.Visible = false;
        }
        else
        {
            UserNameErrorMessage.Visible = true;
            UserNameErrorMessage.Text = "用户名不存在";
        }
    }
}